<xsl:stylesheet version="1.0"
xmlns:date="http://exslt.org/dates-and-times"
xmlns:ebe="http://cks/ebemethods"
xmlns:string="http://exslt.org/strings"
xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:dt="urn:schemas-microsoft-com:datatypes"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="date ebe string">
  <xsl:param name="IsBlogOwner" />
  <xsl:param name="RelativeUrl" />
  <xsl:param name="Language" />
  <xsl:param name="ShortDatePattern" />
  <xsl:param name="IsTechnoratiEnabled" />

  <xsl:output omit-xml-declaration="yes" />

  <xsl:template match="/">
    <!-- <xmp><xsl:copy-of select="."/></xmp> -->

    <xsl:apply-templates select="rows/row"/>
  </xsl:template>

  <xsl:template match="row">

    <xsl:variable name="publishedDate" select="date:parseDate(PublishedDate, 'yyyy-MM-dd HH:mm:ss')" />

    <div class="date">
      <span class="month">
        <xsl:value-of select="ms:format-date($publishedDate, 'MMM', $Language)"/>
      </span>
      <span class="day">
        <xsl:value-of select="ms:format-date($publishedDate, 'd', $Language)"/>
      </span>
    </div>

    <div class="content">
      <h2>
        <xsl:value-of select="Title"/>
        &#160;<xsl:value-of select="ebe:ExportPDF('themes/Wildlife/images/exportPDF.gif', ID)" disable-output-escaping="yes" />
      </h2>

      <span class="categories-post">
        <strong>
          <xsl:value-of select="ebe:res('Categories')"/>:
        </strong>
        <xsl:for-each select="string:split(CategoriesAsText, ';')">
          <a href="{ebe:createTagUrl(.)}">
            <xsl:value-of select="."/>
          </a>
          <xsl:if test="position() != last()">, </xsl:if>
        </xsl:for-each>
        <xsl:if test="$IsTechnoratiEnabled = 'True'">
          <br/>
          <strong>
            <xsl:value-of select="ebe:res('TechnoratiTags')"/>:
          </strong>
          <xsl:for-each select="string:split(CategoriesAsText, ';')">
            <a href="http://technorati.com/tag/{.}" rel="tag">
              <xsl:value-of select="."/>
            </a>
            <xsl:if test="position() != last()">, </xsl:if>
          </xsl:for-each>
        </xsl:if>

      </span>


      <xsl:if test="$IsBlogOwner = 'True'">
        <a href="/{substring-after(FileDirRef,'#')}/EditPost.aspx?ID={ID}">
          [<xsl:value-of select="ebe:res('EditPost')"/>]
        </a>
      </xsl:if>

      <div class="entry">
        <xsl:value-of select="Body" disable-output-escaping="yes"/>

        <div class="clear">&#160;</div>
        <div class="clear">

          <xsl:value-of select="ebe:res('BookmarkPost')"/>:  <span class="categories-post">
            <a href="http://del.icio.us/post?url={ebe:createAbsolutePostUrl(PublishedDate, BlogTitleForUrl)}&amp;title={Title}" title="Add to del.icio.us">
              <img src="{$RelativeUrl}/themes/wildlife/images/delicious.png" border="0"/>
            </a>
            &#160;
            <a href="http://digg.com/submit?phase=2&amp;url={ebe:createAbsolutePostUrl(PublishedDate, BlogTitleForUrl)}" title="Digg it">
              <img src="{$RelativeUrl}/themes/wildlife/images/digg.png" border="0"/>
            </a>
            &#160;
            <a href="http://technorati.com/cosmos/search.html?url={ebe:createAbsolutePostUrl(PublishedDate, BlogTitleForUrl)}" title="Add to Technorati">
              <img src="{$RelativeUrl}/themes/wildlife/images/technorati.png" border="0"/>
            </a>
            &#160;
            <a href="http://www.facebook.com/share.php?u={ebe:createAbsolutePostUrl(PublishedDate, BlogTitleForUrl)}" title="Add to Facebook">
              <img src="{$RelativeUrl}/themes/wildlife/images/facebook.gif" border="0"/>
            </a>
            &#160;
            <a href="http://reddit.com/submit?url={ebe:createAbsolutePostUrl(PublishedDate, BlogTitleForUrl)}&amp;title={Title}" title="Add to Reddit">
              <img src="{$RelativeUrl}/themes/wildlife/images/reddit.png" border="0"/>
            </a>
          </span>

        </div>
        <div class="clear">&#160;</div>
        <div class="clear">
          <a href="{$RelativeUrl}/_layouts/cks/ebe/Trackback.aspx?ID={ID}" rel="trackback">
            <xsl:value-of select="ebe:res('TrackbackUrl')"/>
          </a>
        </div>

        <!-- close div comments -->
      </div>
      <!-- close entry post -->

    </div>
    <!-- close div content -->
    <div class="clear">&#160;</div>
  </xsl:template>

</xsl:stylesheet>
